home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / warpup_dos.ass < prev    next >
Encoding:
Text File  |  1980-12-30  |  1.4 KB  |  69 lines

  1. _START    move.l    a0,_arg
  2.     clr.b    (-1,a0,d0.w)
  3.     movea.l    $4.w,a6
  4.     move.l    a6,_ExecBase
  5.     lea    (DOSName,pc),a1
  6.     moveq    #37,d0
  7.     jsr    (-552,a6)        ; OpenLibrary()
  8.     move.l    d0,_DOSBase
  9.     beq.s    .FINISH
  10.  
  11.     movea.l    d0,a6
  12.     jsr    (-60,a6)        ; Output()
  13.     move.l    d0,_stdout
  14.     jsr    (-54,a6)        ; Input()
  15.     move.l    d0,_stdin
  16.  
  17.     movea.l    $4.w,a6
  18.  
  19.     lea    (PPCName,pc),a1
  20.     moveq    #7,d0
  21.     jsr    (-552,a6)        ; OpenLibrary()
  22.     move.l    d0,_PowerPCBase
  23.     beq.s    .CLOSEDOS
  24.     movea.l    d0,a6
  25.  
  26.     lea    (ppcstruct,pc),a0    ; load ppc structure
  27.     xref    _LinkerDB
  28.     lea    _LinkerDB,a4    ; get local data
  29.     move.l    _PowerPCBase,a1    ; get powerpc.library pointer
  30.     move.l    a4,$44(a0)    ; store a4/r2
  31.     jsr    (-30,a6)
  32.     lea    (ppcstruct,pc),a0
  33.     move.l    (20,a0),d2
  34.  
  35.     movea.l    4.w,a6
  36.     movea.l    _PowerPCBase,a1
  37.     jsr    (-414,a6)        ; CloseLibrary()
  38. .CLOSEDOS    movea.l    _DOSBase,a1
  39.     jsr    (-414,a6)        ; CloseLibrary()
  40. .FINISH    move.l    d2,d0
  41.     rts
  42. ****************************************
  43. DOSName    dc.b    'dos.library',0
  44. PPCName    dc.b    'powerpc.library',0
  45.     cnop    0,4
  46. ****************************************
  47.     xref    _main
  48. ppcstruct    dc.l    _main
  49.     dc.l    0,0,0,0
  50.     dc.l    0,0,0,0,0,0,0,0    ; d0-d7
  51.     dc.l    0,0,0,0,0,0,0    ; a0-a6
  52.     dc.d    0,0,0,0,0,0,0,0    ; fp0-fp7
  53. ****************************************
  54.     xdef    _DOSBase
  55.     xdef    _ExecBase
  56.     xdef    _PowerPCBase
  57.     xdef    _arg
  58.     xdef    _stdout
  59.     xdef    _stdin
  60. ****************************************
  61.     section    ".tocd",data
  62.     dcb.b    32,0
  63. _PowerPCBase    dc.l    0
  64. _ExecBase        dc.l    0
  65. _DOSBase        dc.l    0
  66. _arg        dc.l    0
  67. _stdout        dc.l    0
  68. _stdin        dc.l    0
  69.